<?php
namespace App\Http\Controllers\User;

use App\Http\Controllers\Controller;
use App\Repositories\User\QualificationRepository;
use App\Http\Requests\User\AddAuthRequest;

class QualificationController extends Controller {

    public function authies($uid, QualificationRepository $repository)
    {
        $res = $repository->getQualificatioin($uid);
        if ( $res ) return success($res);
        return failed($res);
    }

    public function addauth(AddAuthRequest $request, QualificationRepository $repository)
    {
        $data = $request->all();
        $res = $repository->addAuth($data);
        if ( $res ) return success($res);
        return failed("未知错误,操作失败");
    }

}